﻿//-----------------------------------------------------------------------
// <copyright file="Program.cs" company="Chaminda Chandrasekara">
//     Chaminda Chandrasekara. All rights reserved.
// </copyright>
//-----------------------------------------------------------------------
namespace FileViewerConsole
{
    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Text;
    using System.Threading.Tasks;
    using API_LIb;

    /// <summary>
    /// Command line change-set file viewer
    /// </summary>
    internal class Program
    {
        /// <summary>
        /// Main Method
        /// </summary>
        /// <param name="args">Command line Arguments</param>
        internal static void Main(string[] args)
        {
            ChangesetFileFinder changesetFileFinder = new ChangesetFileFinder("<TFS Project Collection URL>", null, @"domain\username", "password");

            List<ChangesetFileInfo> changesetFiles = changesetFileFinder.GetChangesetFiles("$/TeamProject/VersionControlPath", 6191, 6210); //Form changeset and To Changest

            foreach (ChangesetFileInfo changedFile in changesetFiles)
            {
                Console.WriteLine(string.Format("Changeset: {0}  File: {1}", changedFile.ChangesetNumber, changedFile.FileName));
            }

            Console.ReadLine();
        }
    }
}
